package com.jiaotong.smart.smartjiaotong.util;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.springframework.stereotype.Component;

@Component
public class xmlParse {

    // 获取文档对象
    public Document parseXml(String xml) {
        Document document = null;
        try {
            document = DocumentHelper.parseText(xml);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return document;
    }
}
